<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>审核订单</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link rel="stylesheet" href="/resource/layuiadmin/layui/css/layui.css" media="all">
<link rel="stylesheet" href="/resource/css/mylay.css">
</head>
<body>
<div style="padding: 20px; background-color: #F2F2F2;">
  <div class="layui-row layui-col-space15">
    <div class="layui-col-md12">
      <div class="layui-card">
        <div class="layui-card-body">
          <form class="layui-form" action="">
            <div class="layui-form-item">
              <label class="layui-form-label">NFT名称</label>
              <div class="layui-input-block">
                <input type="text" name="title" value="{$data.title ?? ''}" autocomplete="off" placeholder="off" class="layui-input" disabled>
              </div>
            </div>
            <div class="layui-form-item">
              <label class="layui-form-label">订单号</label>
              <div class="layui-input-block">
                <input type="text" name="order_sn" value="{$data.order_sn ?? ''}" autocomplete="off" placeholder="off" class="layui-input" disabled>
              </div>
            </div>
            <div class="layui-form-item">
              <label class="layui-form-label">数量</label>
              <div class="layui-input-block">
                <input type="text" name="number" value="{$data.number}" autocomplete="off" placeholder="off" class="layui-input" disabled>
              </div>
            </div>
            <div class="layui-form-item">
              <label class="layui-form-label">总金额</label>
              <div class="layui-input-block">
                <input type="text" name="total_price" value="{$data.total_price}" autocomplete="off" placeholder="off" class="layui-input" disabled>
              </div>
            </div>
            <div class="layui-form-item">
              <label class="layui-form-label">类型</label>
              <div class="layui-input-block">
                <input type="text" name="typeStr" value="{$data.typeStr}" autocomplete="off" placeholder="off" class="layui-input" disabled>
              </div>
            </div>
            <div class="layui-form-item">
              <label class="layui-form-label">管理员备注</label>
              <div class="layui-input-block">
                <textarea name="handle_remarks" placeholder="请输入内容" class="layui-textarea">{$data.handle_remarks ?? ''}</textarea>
              </div>
            </div>
            <div class="layui-form-item">
              <label class="layui-form-label">审核结果</label>
              <div class="layui-input-block">
                <input type="radio" name="status" value="1" title="待支付"{if $data.status eq 1} checked{/if}>
                <input type="radio" name="status" value="2" title="待审核"{if $data.status eq 2} checked{/if}>
                <input type="radio" name="status" value="3" title="已完成"{if $data.status eq 3} checked{/if}>
                <input type="radio" name="status" value="4" title="驳回"{if $data.status eq 4} checked{/if}>
              </div>
            </div>
            <div class="layui-form-item" style="margin-top: 40px;text-align: center;">
              <input type="hidden" name="id" value="{$data.id}" class="layui-input">
              <button class="layui-btn" lay-submit lay-filter="userTaskAudit" data-type="userTaskAudit">提交</button>
              <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
          </form>
        </div>
      </div>
    </div>
  </div>
</div>
<script src="/resource/layuiadmin/layui/layui.js"></script>
<script src="/resource/js/manage/init_date.js"></script>
<!--<script src="/resource/js/manage/bet.js"></script>-->
<script>
  layui.use(['layer', 'table'], function() {
    var $ = layui.$
            , layer = layui.layer
            , table = layui.table
    ,form = layui.form;


    form.on('submit(userTaskAudit)', function(data){
      $.ajax({
        url: "/manage/bet/userTaskAudit",
        data: data.field,
        type: "POST",
        dataType: "json",
        timeout: 15000,
        beforeSend: function(){
          layer.load(1);
        },
        success: function(msg){
          var alertStr = (msg == 1) ? '操作成功' : msg;
          layer.msg(alertStr, {time: 2000}, function(){
            if(msg==1){
              parent.layer.closeAll();
              parent.layui.table.reload('userTaskList');
            }
          });
        },
        complete: function(){
          layer.closeAll("loading");
        }
      });
      return false;
    });
  })
</script>
</body>
</html>
